﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NETMovie.Entities;
using System.Data;

namespace NETMovie.Repositories
{
    public interface ITransactionRepository : IDisposable
    {
        Transaction GetOpenTransaction(string username);
        Transaction CreateTransaction(string username);
        bool RentMovie(int transactionID, int movieId);
        MovieRental GetRental(int rentalID);
        bool UnrentMovie(int rentalId);
        Transaction GetTransaction(int transactionID);
        bool Checkout(int transactionID, decimal amount);
        bool ReturnMovie(int rentalID);
        MovieRental[] GetOpenRentals(string username);
        MovieRental[] GetDueRentals(string username);
        MovieRental[] GetActiveRentals(string username);

        DataTable GetProfitableUsers(string title, DateTime startDate, DateTime endDate);
    }
}
